package cn.com.mengdou.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liufl E-mail:Huberier@allpyra.com
 * @version 创建时间：2017年10月26日 上午10:54:28
 * 类说明
 */
@Controller  
@RequestMapping("/api/test")  
public class TestController {

	@RequestMapping("/home")
	public String goHome(Model model,@RequestParam(value="uName",defaultValue="kitty")String uName){
		model.addAttribute("userName", uName);
		return "showUser";
	}
	//http://localhost:8080/Spring3Websocket/api/test/websocket
	//spring-mvc.xml指定了imServer端口为8088
	@RequestMapping("/websocket")
	public String doNettyWebsocket(Model model,@RequestParam(value="uName",defaultValue="kitty")String uName){
		model.addAttribute("userName", uName);
		return "chat";
	}
}

